<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../jquery/jquery-3.6.0.min.js"></script>
    <link rel="stylesheet" href="../css/sidenav.css">
    <link rel="stylesheet" href="../font_cqbiizu5og9/iconfont.css">
</head>

<body>
    <div class="myhead">
        <div class="img1">
            <img src="../img/baby+1.jpg" alt="">
            <span>阳光幼儿园管理系统</span>
        </div>
        <div class="img2">
            <img src="../img/0.jpg" alt="">
            <span>欢迎您，管理员</span>
            <a href="login.html">退出</a>
        </div>
        <div id="myTime">

        </div>

    </div>
    <div>
        <div class="left">
            <ul>
                <li class="main" style=" border: .1px solid #c7bcbc;"><i class="iconfont icon-liebiao"></i>
                    <span onclick="openMenu(this)"><a href="index.html" target="framename" style="color: black">主页</a></span>
                </li>
                <li class="main"><i class="iconfont icon-cangku"></i><span onclick="openMenu(this)">基础管理</span>
                    <ul class="sum0">
                        <li class="lix" value="1"><a href="#">部门管理</a></li>
                        <li class="lix" value="2"><a href="#">职工管理</a></li>
                        <li class="lix" value="3"><a href="#">班级管理</a></li>
                        <li class="lix" value="4"><a href="#">学生管理</a></li>
                    </ul>
                </li>

                <li class="main lix" value="5"><i class="iconfont icon-zhuti_tiaosepan"></i><span onclick="openMenu(this)">权限管理</span>
                    <ul class="sum1">


                    </ul>
                </li>

                <li class="main lix" value="6" ><i class="iconfont icon-tupian"></i><span onclick="openMenu(this)">照片墙</span>
                    <ul class="sum2">


                    </ul>
                </li>

                <li class="main lix" value="9"><i class="iconfont icon-erweima"></i><span onclick="openMenu(this)">考勤管理</span>
                    <ul class="sum3">
                       
                    </ul>
                </li>
                <li class="main lix" value="7"><i class="iconfont icon-qianbao"></i><span onclick="openMenu(this)">公告管理</span>
                    <ul class="sum4">

                    </ul>
                </li>
                <li class="main lix" value="8"><i class="iconfont icon-dunpaibaoxianrenzheng"></i><span
                        onclick="openMenu(this)">员工信息</span>
                    <ul class="sum5">

                    </ul>
                </li>
            </ul>
        </div>
        <div class="right">
            <iframe id="iframe0" src="index.html" frameborder="1" name="framename"></iframe>
            <iframe value="1" class="iframeShow" src="../html/department.html" frameborder="1" name="framename"></iframe>
            <iframe value="2" class="iframeShow" src="../html/staff.html" frameborder="1" name="framename"></iframe>
            <iframe value="3" class="iframeShow" src="../html/createClass.html" frameborder="1" name="framename"></iframe>
            <iframe value="4" class="iframeShow" src="../html/createStudent.html" frameborder="1" name="framename"></iframe>
            <iframe value="5" class="iframeShow" src="../html/rolepermissions.html" frameborder="1" name="framename"></iframe>
            <iframe value="6" class="iframeShow" src="../html/photo.html" frameborder="1" name="framename"></iframe>
            <iframe value="7" class="iframeShow" src="../html/notice.html" frameborder="1" name="framename"></iframe>
            <iframe value="8" class="iframeShow" src="../html/staffManege.html" frameborder="1" name="framename"></iframe>
            <iframe value="9" class="iframeShow" src="../html/checkwork.html" frameborder="1" name="framename"></iframe>
        </div>
    </div>
    <script>
        function openMenu(thisNode) {

            let liListNum = thisNode.parentNode.getElementsByTagName('li').length

            let listLi = document.getElementsByClassName('main')

            if (thisNode.parentNode.style.height == '50px' || thisNode.parentNode.style.height == '') {
                for (let i = 0; i < listLi.length; i++) {
                    listLi[i].style.height = 50 + 'px'
                }
                thisNode.parentNode.style.height = (liListNum + 1) * 50 + 'px'
            } else {
                thisNode.parentNode.style.height = 50 + 'px'
            }
        }
        // iframe页面跳转
        $(function () {
            let liShow = document.getElementsByClassName("iframeShow")
            $(".lix").click(function(){
                $("#iframe0").css("display","none")
                for(let i = 0; i <liShow.length; i++){
                    liShow[i].style.display = "none";
                }
                liShow[this.value-1].style.display = "block"
            })
        })
        setInterval(() => {
            getTime()
        }, 1000)
        function getTime() {
            var time = new Date();
            var year = time.getFullYear();
            var month = time.getMonth() + 1;
            var date = time.getDate();
            var day = time.getDay();
            var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
            var week = weeks[day];
            var hour = time.getHours();
            var minutes = time.getMinutes();
            var seconds = time.getSeconds();
            if (month < 10) {
                month = "0" + month;
            }
            if (date < 10) {
                date = "0" + date;
            }
            if (hour < 10) {
                hour = "0" + hour;
            }
            if (minutes < 10) {
                minutes = "0" + minutes;
            }
            if (seconds < 10) {
                seconds = "0" + seconds;
            }
            let myTime = document.getElementById("myTime")
            document.getElementById("myTime").innerHTML = year + "年" + month + "月" + date + "日" + week + hour + ":" + minutes + ":" + seconds;

        }

    </script>
</body>

</html>